From: kfraser@localhost.localdomain Date: Mon, 2 Apr 2007 16:34:00 +0000 (+0100) Subject: xend: Map re.compile on hosts_allow for XMLRPCServer. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15270^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f8849649858aff0208c155de28390cdb20cd4bfb;p=xen.git xend: Map re.compile on hosts_allow for XMLRPCServer. Changeset 14601 removed a re.compile() map on hosts_allow, hence breaking the tcp xmlrpc api ('str' has no attribute match in xend-debug.log). From: Pascal Bouchareine Signed-off-by: Keir Fraser --- diff --git a/tools/python/xen/xend/server/SrvServer.py b/tools/python/xen/xend/server/SrvServer.py index 34f2dc4f95..bfb772f82a 100644 --- a/tools/python/xen/xend/server/SrvServer.py +++ b/tools/python/xen/xend/server/SrvServer.py @@ -212,8 +212,8 @@ def _loadConfig(servers, root, reload): if server_cfg[1] in [XendAPI.AUTH_PAM, XendAPI.AUTH_NONE]: auth_method = server_cfg[1] - if len(server_cfg) > 2: - hosts_allowed = server_cfg[2] or None + if len(server_cfg) > 2 and len(server_cfg[2]): + hosts_allowed = map(re.compile, server_cfg[2].split(' ')) if len(server_cfg) > 4: # SSL key and cert file